package com.example.zjsr.service;

import com.example.zjsr.domain.Admin.knowledge.HeadLine;
import com.example.zjsr.domain.Admin.knowledge.Knowledge;
import com.example.zjsr.domain.Admin.knowledge.KnowledgeAnswer;

import java.util.List;

/**
 * @author lvyongwei
 */
public interface KnowledgeService {

    /**
     * 添加知识互动内容
     * @param knowledge
     * @return
     */
    public boolean addKnowledge(Knowledge knowledge);

    /**
     * 修改知识互动内容及答案
     * @param knowledge
     * @return
     */
    public void updateKnowledge(Knowledge knowledge);

    /**
     * 查询所有知识互动内容
     * @param headLineId
     * @return
     */
    public List<Knowledge> selectKnowledge(Integer headLineId);

    /**
     * 根据知识id查询所有答案
     * @param knowledgeId
     * @return
     */
    public List<KnowledgeAnswer> selectKnowledgeAnswer(Integer knowledgeId);

    /**
     * 一次性查询全部标题，知识互动及答案内容
     * @return
     */
    public List<HeadLine> selectAllKnowledge();
}
